<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="../css/reset.css">
    <style>
        .container {
            width: 1226px;
            margin-right: auto;
            margin-left: auto;
        }

        .topbar {
            height: 40px;
            background-color: #333;
        }

        .topbar-nav {
            float: left;
            line-height: 40px;
            color: #b0b0b0;
        }

        .topbar-nav li {
            float: left;
            position: relative;
        }

        .topbar-nav li span {
            margin: 0 4px;
            color: #444;
        }

        .code {
            width: 124px;
            height: 148px;
            background-color: #ff0;

            position: absolute;
            top: 40px;

            left: 50%;
            transform: translate(-50%);

            height: 0;
            overflow: hidden;
            transition: .3s;
        }

        .topbar-nav li:hover .code {
            height: 148px;
        }

        .topbar-cart {

            width: 120px;
            height: 40px;
            position: relative;
            float: right;
            margin-left: 15px;
            background-color: #424242;
            text-align: center;
            line-height: 40px;
            color: #b0b0b0;
        }

        .topbar-cart a {
            display: block;
        }
    </style>
</head>

<body>
    <div class="topbar">
        <div class="container">
            <ul class="topbar-nav">
                <li>
                    <a href="">小米官网</a>
                    <span>|</span>
                </li>
                <li>
                    <a href="">小米官网</a>
                    <span>|</span>
                </li>
                <li>
                    <a href="">小米官网</a>
                    <span>|</span>
                </li>
                <li>
                    <a href="">小米官网</a>
                    <span>|</span>
                </li>
                <li>
                    <a href="">小米官网</a>
                    <span>|</span>
                </li>
                <li>
                    <a href="">小米官网</a>
                    <span>|</span>
                </li>
                <li>
                    <a href="">下载app</a>
                    <span>|</span>
                    <div class="code">

                    </div>
                </li>
                <li>
                    <a href="">小米官网</a>
                    <span>|</span>
                </li>
            </ul>
            <div class="topbar-cart">
                <a href="">购物车</a>
            </div>
        </div>
    </div>
</body>

</html>